package com.atguigu.springcloud.service.impl;

import com.atguigu.springcloud.entities.Dept;
import com.atguigu.springcloud.mapper.DeptMapper;
import com.atguigu.springcloud.service.IDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Auther:
 * @Description:
 * @Date: 2019/11/19 15:18
 */
@Service
public class DeptServiceImpl implements IDeptService {

    @Autowired
    private DeptMapper deptMapper;

    public boolean add(Dept dept) {
        return deptMapper.addDept(dept);
    }

    public Dept get(Long id) {
        return deptMapper.findById(id);
    }

    public List<Dept> list() {
        return deptMapper.findAll();
    }
}
